package Service;

import Dao.UpdateUserDao;
import Dao.UserDao;
import Table.User;

public class UpdateUserService {
    public static Boolean Update(String username, String password1, String password2) {
        User user = UserDao.FindUser(username, password1);
        if (user == null) {
            return false;
        } else {
            UpdateUserDao.UpdateUser(username, password2);
        }
        return true;
    }
}
